
import { Modal, Button, Form, Input, Select, } from 'antd';
import React, { Component } from 'react'
import { MoTaiKuanStyle, DivBox } from './MoTaiKuanStyle';
import { Switch } from 'antd';


export default class MoTaiKuang2 extends Component {
  state = {
    modal1Visible: false,
    modal2Visible: false,
  };

  setModal1Visible(modal1Visible) {
    this.setState({ modal1Visible });
  }

  setModal2Visible(modal2Visible) {
    this.setState({ modal2Visible });
  }

  render() {
    let onChange = (checked) => {
      console.log(`switch to ${checked}`);
    }
    return (
      <>
        <MoTaiKuanStyle>
          <a onClick={() => this.setModal1Visible(true)} className="a_box">
            编辑
          </a>
          <Modal
            title="新增体检项"
            visible={this.state.modal1Visible}
            onOk={() => this.setModal1Visible(false)}
            onCancel={() => this.setModal1Visible(false)}
            width={800}
          >
            <DivBox>
              <div className="div_left">
                <Form>
                  <Form.Item
                    name="note"
                    label="体检项名称"
                  >
                    <Input />
                  </Form.Item>
                </Form>
                <Form className="form2">
                  <Form.Item
                    name="note"
                    label="体检项ID"
                  >
                    <Input />
                  </Form.Item>
                </Form>
                <p className="p_box">是否启用:<Switch defaultChecked onChange={onChange} /></p>
                <div className="btn_box">
                  <p className='p_button'>适用标签:</p>
                  <div className="button_box">
                    <Button>男性项目</Button><Button>女性项目</Button><Button>已婚项目</Button><Button>未婚项目</Button>
                    <Button>不区分性别</Button><Button>不区分婚否</Button>
                  </div>
                </div>
                <Form className="form_box">
                  <Form.Item
                    name="note"
                    label="原价"
                    className="input3"
                  >
                    <Input />
                  </Form.Item>
                  <Form.Item
                    name="note"
                    label="售价"
                  >
                    <Input />
                  </Form.Item>
                </Form>
               
              </div>
              <div className="div_right">
                <div id="area_box">
                  <Form.Item label="适用地区" className="select2 selectItem">
                    <Select>
                      <Select.Option value="demo">Demo</Select.Option>
                    </Select>
                  </Form.Item>
                  <Form.Item className="select2 selectItem2">
                    <Select>
                      <Select.Option value="demo">Demo</Select.Option>
                    </Select>
                  </Form.Item>
                  <Form.Item label="适用机构" className="select2 selectItem3">
                    <Select>
                      <Select.Option value="demo">Demo</Select.Option>
                    </Select>
                  </Form.Item>
                </div>
                <div className="area_box">
                  <p>检查范围:</p>
                  <textarea className="textarea_box"></textarea>
                </div>
              </div>
              
            </DivBox>
          </Modal>
        </MoTaiKuanStyle>

      </>
    );
  }
}

